#ifndef CX_TYPEDEF_H
#define CX_TYPEDEF_H

#define CX_NULL ((void *)0)
#define CX_HANDLER_CLASS_MASK  0xe0000000
#define CX_HANDLER_CLASS_SET   0x00000000
#define CX_HANDLER_CLASS_GET   0x20000000
#define CX_HANDLER_CLASS_INTR  0x40000000
#define CX_HANDLER_CLASS_EVENT 0x60000000
#define CX_HANDLER_CLASS_CFG   0x80000000
#define CX_HANDLER_CLASS_CTRL  0xa0000000

#define CX_HANDLER_SUB_CLASS_INTR_ENABLE  0x0100
#define CX_HANDLER_SUB_CLASS_INTR_DISABLE 0x0000

typedef char cx_int8_t;
typedef unsigned char cx_uint8_t;
typedef cx_uint8_t cx_u8;

typedef short cx_int16_t;
typedef unsigned short cx_uint16_t;
typedef cx_uint16_t cx_u16;

typedef int cx_int32_t;
typedef unsigned int cx_uint32_t;
typedef cx_uint32_t cx_u32;

typedef long long int cx_int64_t;
typedef unsigned long long int cx_uint64_t;

typedef void* cx_pointer_t;

typedef enum cx_bool
{
    cx_false,
    cx_true
}cx_bool_t;

typedef enum
{
    CX_DATATYPE_INT8,
    CX_DATATYPE_UINT8,
    CX_DATATYPE_INT16,
    CX_DATATYPE_UINT16,
    CX_DATATYPE_INT32,
    CX_DATATYPE_UINT32,
    CX_DATATYPE_INT64,
    CX_DATATYPE_UINT64,
    CX_DATATYPE_FLOAT,
    CX_DATATYPE_DOUBLE,
    CX_DATATYPE_CHAR,
    CX_DATATYPE_STRING,
}cx_datatype_t;

typedef enum
{
    CX_RESET,
    CX_SET
}cx_bit_status_t;

typedef enum
{
    CX_ERR_OK,
    CX_ERR_OVF,
    CX_ERR_CONFLICT,
    CX_ERR_NOMATCH,
}cx_err_t;

typedef enum
{
    CX_DISABLE,
    CX_ENABLE
}cx_FunctionalState_t;

typedef void (*cx_cb_func_t)(void *);
typedef void (*cx_intr_cb_t)(void *args);
typedef void * cx_cb_args_t;
//Select Mechanism Bit 
typedef unsigned char cx_byte;
typedef cx_int32_t cx_int;
typedef cx_uint32_t cx_uint;
typedef cx_uint64_t cx_uintptr_t;
typedef long long unsigned int cx_size_t;

void nop_intr_cb(void *args);

#endif
